home *** CD-ROM | disk | FTP | other *** search
/ Programmer Plus 2007 / Programmer-Plus-2007.iso / Programming / Visual Basic new SourceCode and Projects / Barcode Generator 2.0 / toolfrm.frm (.txt) < prev   
Encoding:
Visual Basic Form  |  2000-06-23  |  7.6 KB  |  250 lines

  1. VERSION 5.00
  2. Begin VB.Form toolfrm 
  3.    BorderStyle     =   4  'Festes Werkzeugfenster
  4.    Caption         =   "Tools"
  5.    ClientHeight    =   3270
  6.    ClientLeft      =   45
  7.    ClientTop       =   285
  8.    ClientWidth     =   3255
  9.    LinkTopic       =   "Form1"
  10.    LockControls    =   -1  'True
  11.    MaxButton       =   0   'False
  12.    MinButton       =   0   'False
  13.    ScaleHeight     =   3270
  14.    ScaleWidth      =   3255
  15.    ShowInTaskbar   =   0   'False
  16.    StartUpPosition =   3  'Windows-Standard
  17.    Begin VB.CommandButton Command5 
  18.       Caption         =   "Options..."
  19.       Height          =   255
  20.       Left            =   2160
  21.       TabIndex        =   15
  22.       Top             =   2280
  23.       Width           =   975
  24.    End
  25.    Begin VB.CommandButton Command6 
  26.       Caption         =   "Open..."
  27.       Height          =   255
  28.       Left            =   120
  29.       TabIndex        =   8
  30.       Top             =   1800
  31.       Width           =   735
  32.    End
  33.    Begin VB.TextBox Text2 
  34.       Height          =   285
  35.       Left            =   120
  36.       Locked          =   -1  'True
  37.       TabIndex        =   7
  38.       Text            =   "C:\programm files\bar code\bc.db"
  39.       Top             =   1080
  40.       Width           =   3015
  41.    End
  42.    Begin VB.CommandButton Command4 
  43.       Caption         =   "P"
  44.       Height          =   255
  45.       Left            =   2880
  46.       TabIndex        =   5
  47.       Top             =   360
  48.       Width           =   255
  49.    End
  50.    Begin VB.CommandButton Command3 
  51.       Caption         =   "Repair"
  52.       Height          =   255
  53.       Left            =   2160
  54.       TabIndex        =   4
  55.       Top             =   360
  56.       Width           =   615
  57.    End
  58.    Begin VB.CommandButton Command2 
  59.       Caption         =   "-"
  60.       Height          =   255
  61.       Left            =   1800
  62.       TabIndex        =   3
  63.       Top             =   360
  64.       Width           =   255
  65.    End
  66.    Begin VB.CommandButton Command1 
  67.       Caption         =   "+"
  68.       Height          =   255
  69.       Left            =   1560
  70.       TabIndex        =   2
  71.       Top             =   360
  72.       Width           =   255
  73.    End
  74.    Begin VB.TextBox Text1 
  75.       Height          =   285
  76.       Left            =   120
  77.       MaxLength       =   13
  78.       TabIndex        =   1
  79.       Text            =   "2501007661990"
  80.       Top             =   360
  81.       Width           =   1335
  82.    End
  83.    Begin VB.Label Label8 
  84.       AutoSize        =   -1  'True
  85.       BackStyle       =   0  'Transparent
  86.       Caption         =   "Bytes"
  87.       Height          =   195
  88.       Left            =   2212
  89.       TabIndex        =   14
  90.       Top             =   1455
  91.       Width           =   390
  92.    End
  93.    Begin VB.Label Label7 
  94.       Alignment       =   1  'Rechts
  95.       BackStyle       =   0  'Transparent
  96.       Caption         =   "1"
  97.       Height          =   195
  98.       Left            =   1057
  99.       TabIndex        =   13
  100.       Top             =   1455
  101.       Width           =   1050
  102.    End
  103.    Begin VB.Label Label6 
  104.       AutoSize        =   -1  'True
  105.       BackStyle       =   0  'Transparent
  106.       Caption         =   "Size:"
  107.       Height          =   195
  108.       Left            =   652
  109.       TabIndex        =   12
  110.       Top             =   1450
  111.       Width           =   345
  112.    End
  113.    Begin VB.Label Label5 
  114.       Caption         =   "mailto:borg@bluewin.ch"
  115.       Height          =   255
  116.       Left            =   120
  117.       TabIndex        =   11
  118.       Top             =   2760
  119.       Width           =   1695
  120.    End
  121.    Begin VB.Label Label4 
  122.       AutoSize        =   -1  'True
  123.       Caption         =   "Loreno Heer"
  124.       Height          =   195
  125.       Left            =   120
  126.       TabIndex        =   10
  127.       Top             =   2520
  128.       Width           =   885
  129.    End
  130.    Begin VB.Label Label3 
  131.       AutoSize        =   -1  'True
  132.       Caption         =   "Programed by:"
  133.       Height          =   195
  134.       Left            =   120
  135.       TabIndex        =   9
  136.       Top             =   2280
  137.       Width           =   1020
  138.    End
  139.    Begin VB.Label Label2 
  140.       AutoSize        =   -1  'True
  141.       BackStyle       =   0  'Transparent
  142.       Caption         =   "Database"
  143.       Height          =   195
  144.       Left            =   120
  145.       TabIndex        =   6
  146.       Top             =   840
  147.       Width           =   690
  148.    End
  149.    Begin VB.Line Line1 
  150.       BorderColor     =   &H00000000&
  151.       X1              =   0
  152.       X2              =   3240
  153.       Y1              =   710
  154.       Y2              =   710
  155.    End
  156.    Begin VB.Label Label1 
  157.       AutoSize        =   -1  'True
  158.       BackStyle       =   0  'Transparent
  159.       Caption         =   "EAN"
  160.       Height          =   195
  161.       Left            =   120
  162.       TabIndex        =   0
  163.       Top             =   120
  164.       Width           =   330
  165.    End
  166.    Begin VB.Line Line2 
  167.       BorderColor     =   &H00E0E0E0&
  168.       BorderWidth     =   2
  169.       X1              =   0
  170.       X2              =   3240
  171.       Y1              =   720
  172.       Y2              =   720
  173.    End
  174.    Begin VB.Line Line3 
  175.       BorderColor     =   &H00000000&
  176.       X1              =   0
  177.       X2              =   3240
  178.       Y1              =   2160
  179.       Y2              =   2160
  180.    End
  181.    Begin VB.Line Line4 
  182.       BorderColor     =   &H00E0E0E0&
  183.       BorderWidth     =   2
  184.       X1              =   0
  185.       X2              =   3240
  186.       Y1              =   2175
  187.       Y2              =   2175
  188.    End
  189. Attribute VB_Name = "toolfrm"
  190. Attribute VB_GlobalNameSpace = False
  191. Attribute VB_Creatable = False
  192. Attribute VB_PredeclaredId = True
  193. Attribute VB_Exposed = False
  194. Private Sub Command1_Click()
  195. If Len(Text1.text) >= 12 And IsNumeric(Text1.text) = True Then
  196. Text1.text = Mid$(Text1.text, 1, 12)
  197. Text1.text = Text1.text + 1
  198. Text1.text = Text1.text & "0"
  199. Do Until CheckCode(Text1.text) = True
  200. Text1.text = Mid$(Text1.text, 1, 12) & (Mid$(Text1.text, 13, 1) + 1)
  201. End If
  202. End Sub
  203. Private Sub Command2_Click()
  204. If Len(Text1.text) >= 12 And IsNumeric(Text1.text) = True Then
  205. Text1.text = Mid$(Text1.text, 1, 12)
  206. Text1.text = Text1.text - 1
  207. Text1.text = Text1.text & "0"
  208. Do Until CheckCode(Text1.text) = True
  209. Text1.text = Mid$(Text1.text, 1, 12) & (Mid$(Text1.text, 13, 1) + 1)
  210. End If
  211. End Sub
  212. Private Sub Command3_Click()
  213. If Len(Text1.text) >= 12 And IsNumeric(Text1.text) = True Then
  214. Text1.text = Mid$(Text1.text, 1, 12)
  215. Text1.text = Text1.text & "0"
  216. Do Until CheckCode(Text1.text) = True
  217. Text1.text = Mid$(Text1.text, 1, 12) & (Mid$(Text1.text, 13, 1) + 1)
  218. End If
  219. End Sub
  220. Private Sub Command4_Click()
  221.     If Len(Text1.text) = 13 Then
  222.         Mainfrm.ActiveForm.Width = (options.Text1.text)
  223.         Mainfrm.ActiveForm.Cls
  224.         Mainfrm.ActiveForm.ScaleMode = 3
  225.         Mainfrm.ActiveForm.Label1.Visible = True
  226.         PaintCode Mainfrm.ActiveForm, Mid$(Text1.text, 1, 1), Mid$(Text1.text, 2, 6), Mid$(Text1.text, 8, 6)
  227.         Mainfrm.ActiveForm.Label1.Caption = Mid$(Text1.text, 1, 1)
  228.         Mainfrm.ActiveForm.Label2.Caption = Mid$(Text1.text, 2, 6)
  229.         Mainfrm.ActiveForm.Label3.Caption = Mid$(Text1.text, 8, 6)
  230.         Mainfrm.ActiveForm.Refresh
  231.     Else
  232.         MsgBox "Error: The lenght of the code is wrong", vbCritical, "Error"
  233.     End If
  234. End Sub
  235. Private Sub Command5_Click()
  236. options.Show
  237. End Sub
  238. Private Sub Command6_Click()
  239. DBfrm.Show
  240. End Sub
  241. Private Sub Form_Load()
  242. Dim FileNum As Integer, RecLength As Long, CodeDB As DBcode
  243. RecLength = LenB(CodeDB)
  244. FileNum = FreeFile
  245. Text2.text = App.Path & "\BarCode.db"
  246. Open Text2.text For Random As FileNum Len = RecLength
  247. Label7.Caption = LOF(FileNum)
  248. Close FileNum
  249. End Sub
  250.